#import "YLWebImageCompat.h"
#import "YLWebImageManager.h"
#import "YLWebImageTransition.h"

FOUNDATION_EXPORT NSString * _Nonnull const YLWebImageInternalSetImageGroupKey __deprecated_msg("Key Deprecated. Does nothing. This key should be used only internally");

FOUNDATION_EXPORT NSString * _Nonnull const YLWebImageExternalCustomManagerKey;

FOUNDATION_EXPORT const int64_t YLWebImageProgressUnitCountUnknown; /* 1LL */

typedef void(^YLSetImageBlock)(UIImage * _Nullable image, NSData * _Nullable imageData);

@interface UIView (YLWebCache)

- (nullable NSURL *)yl_imageURL;

@property (nonatomic, strong, null_resettable) NSProgress *yl_imageProgress;

- (void)yl_internalSetImageWithURL:(nullable NSURL *)url
                  placeholderImage:(nullable UIImage *)placeholder
                           options:(YLWebImageOptions)options
                      operationKey:(nullable NSString *)operationKey
                     setImageBlock:(nullable YLSetImageBlock)setImageBlock
                          progress:(nullable YLWebImageDownloaderProgressBlock)progressBlock
                         completed:(nullable YLExternalCompletionBlock)completedBlock;

- (void)yl_internalSetImageWithURL:(nullable NSURL *)url
                  placeholderImage:(nullable UIImage *)placeholder
                           options:(YLWebImageOptions)options
                      operationKey:(nullable NSString *)operationKey
                     setImageBlock:(nullable YLSetImageBlock)setImageBlock
                          progress:(nullable YLWebImageDownloaderProgressBlock)progressBlock
                         completed:(nullable YLExternalCompletionBlock)completedBlock
                           context:(nullable NSDictionary<NSString *, id> *)context;

- (void)yl_cancelCurrentImageLoad;

#if YL_UIKIT || YL_MAC

#pragma mark - Image Transition

@property (nonatomic, strong, nullable) YLWebImageTransition *yl_imageTransition;

#if YL_UIKIT

#pragma mark - Activity indicator


- (void)yl_setShowActivityIndicatorView:(BOOL)show;

- (void)yl_setIndicatorStyle:(UIActivityIndicatorViewStyle)style;

- (BOOL)yl_showActivityIndicatorView;
- (void)yl_addActivityIndicator;
- (void)yl_removeActivityIndicator;

#endif

#endif

@end
